/**
 *
 */
package com.angel.mocks.factories;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import org.apache.commons.lang.RandomStringUtils;

import com.angel.mocks.providers.Address;

/**
 * @author William
 *
 */
public class AddressFactory {

	private AddressFactory(){
		super();
	}

	public static Address createEmptyAddress(){
		return new Address();
	}

	public static Address createAddress(){
		Address address = createEmptyAddress();
		address.setNumber(Integer.valueOf(RandomStringUtils.randomNumeric(5)));
		address.setStreet(RandomStringUtils.randomAlphabetic(15));
		address.setZipNumber(Integer.valueOf(RandomStringUtils.randomNumeric(4)));
		return address;
	}

	public static Collection<Address> createAddress(int quantity){
		List<Address> addresses = new ArrayList<Address>();
		for(int i = 0; i < quantity; i++){
			addresses.add(createAddress());
		}
		return addresses;
	}
}
